@echo off
echo ************************************************  
echo auto verify jar 
echo parm1: the version of jar, like 1.4.1
echo parm2: the num of pre-version to show(optional)  

echo for example: start.bat 1.4.1
echo ************************************************
if /i "%~1" equ "" (
	echo parm cannot be null
	goto:eof
)
set jar_version=%~1
if /i "%~2" equ "" (
	set show_count=3
) else (
	set show_count=%~2
)

set jar_name=oms.ow.dto-%jar_version%.jar
if exist lib\%jar_name% (
	javac -encoding utf-8 -classpath .;lib\%jar_name%;lib\commons-lang3-3.5.jar;lib\json-20160807.jar;lib\slf4j-api-1.7.7.jar;lib\jackson-annotations-2.8.9.jar;lib\jackson-core-2.8.10.jar;lib\jackson-databind-2.8.10.jar -sourcepath src src\*.java -d .

	java -classpath .;lib\%jar_name%;lib\commons-lang3-3.5.jar;lib\json-20160807.jar;lib\slf4j-api-1.7.7.jar;lib\jackson-annotations-2.8.9.jar;lib\jackson-core-2.8.10.jar;lib\jackson-databind-2.8.10.jar testJar %jar_version% %show_count%
) else (
	echo lib\%jar_name% is not exist
)